Skip to content

Conversation

jesseditson
Copy link

remove filter_e from call to acrcloud_extr_tool.create_fingerprint_by_file since it no longer seems to accept it

Fixes #7

res = ''
try:
query_data = {}
if self.recognize_type == ACRCloudRecognizeType.ACR_OPT_REC_AUDIO or self.recognize_type == ACRCloudRecognizeType.ACR_OPT_REC_BOTH:
query_data['sample'] = acrcloud_extr_tool.create_fingerprint_by_file(file_path, start_seconds, rec_length, False, filter_e)
query_data['sample'] = acrcloud_extr_tool.create_fingerprint_by_file(file_path, start_seconds, rec_length, False)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
query_data['sample'] = acrcloud_extr_tool.create_fingerprint_by_file(file_path, start_seconds, rec_length, False)
query_data['sample'] = acrcloud_extr_tool.create_fingerprint_by_file(file_path, start_seconds, rec_length, False)

@@ -171,12 +171,12 @@ def recognize(self, wav_audio_buffer):
res = ACRCloudStatusCode.get_result_error(ACRCloudStatusCode.UNKNOW_ERROR_CODE, str(e))
return res

def recognize_by_file(self, file_path, start_seconds=0, rec_length=10, filter_e=0):
def recognize_by_file(self, file_path, start_seconds=0, rec_length=10):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def recognize_by_file(self, file_path, start_seconds=0, rec_length=10):
def recognize_by_file(self, file_path, start_seconds=0, rec_length=10):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def recognize_by_file(self, file_path, start_seconds=0, rec_length=10):
def recognize_by_file(self, file_path, start_seconds=0, rec_length=10):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python 2.7 : recognize_by_file throws an error
2 participants